Dawid Kałędkowski@ClickMeeting
2018-07-04
source: sportowefakty.pl/zuzel, speedwayupdates.proboards.com, speedwayresults.com
rvest,RSelenium and a lot of REGEXP)tabulizer)stringdist::amatch)shiny, rhandsontable with RMySQL)gate*heat*stadium)Model is estimated using Bayesian Approximation Method \[ \large R_i^{'} \leftarrow R_i + K * ( Y_i - \hat{Y_i} ) \]
Update doesn't require previous data
Computationaly efficient
\[ \large \hat{Y_{ij}} = P(X_i>X_j) = \frac{1}{ 1 + 10^{-g(RD_{ij}) * (R_i-R_j)/400}} \]
\[ \large {R'}_i = R_i + \frac{1}{\frac{1}{{RD}^2_{i}} + \frac{1}{d^2_i}} * \sum_j{g(RD_j) * (Y_{ij} - \hat{Y_{ij}}) } \] \[ \large {RD'}_i = \sqrt{(\frac{1}{{RD}^2_{i}} + \frac{1}{d^2_i}})^{-1} \]
\[ \large \hat{Y_{ij}} = \frac{1}{1 + e^{-g(\phi_{ij})*(\mu_i - \mu_j)} } \]
\[ \large {\phi'}_i = \frac{1}{\sqrt{ \frac{1}{ { {\phi_i}^2 + {\sigma'_i}^2}} + \frac{1}{v} }} \]
\[ \large {\mu'_i} = \mu_i + {\phi'}_i * \sum_j{g(\phi_j)*(Y_{ij} - \hat{Y_{ij}})} \]
\[ \large \hat{Y_{ij}} = P(X_i>X_j) = \frac{e^{R_i/c_{i_j}}}{e^{R_i/c_{ij}} + e^{R_j/c_{ij}}} \]
\[ \large {R'}_i = R_i + \sum_j{\frac{RD_i^2}{c_{ij}}*(Y_{ij} - \hat{Y_{ij}})} \] \[ \large {RD'}_i = RD_i * [ 1 - \frac{RD_{ij}^2}{RD_i^2}\sum_j{ \gamma_j * (\frac{RD_i}{c_{ij}})^2* \hat{Y_{ij}}\hat{Y_{ji}} } ] \]
\[ \large \beta_t = {\beta_{t-1}} + \eta_t \]
\[ \large Y_t = \frac{e^{z}}{1+e^{z_{t}}} \]
\[ \small z_t = \beta_{it}^Tx_{it}-\beta_{jt}^Tx_{jt} \]
\[ \small w_t = w_{t-1} + {\sum{_t}} x_t \]
# devtools::install_github("gogonzo/sport")
library(sport)
rider_name) abilities with given outputs (rank) nested within particular heats (id)list_glicko <- glicko_run( formula = rank|id ~ rider_name ,
data = gpheats )
Output contains:
r data.frame with all historical parameters (ratings and ratings deviations) estimationpairs data.frame with pair combination within heats with estimated winning probabilityfinal_r actual ratings estimationsfinal_rd actual ratings deviationsnames( list_glicko )
[1] "r" "pairs" "final_r" "final_rd"
head( list_glicko$r )
tail( list_glicko$pairs )
sport package.References:
Mark E. Glickman (1999): Parameter estimation in large dynamic paired comparison experiments. Applied Statistics, 48:377-394. URL http://www.glicko.net/research/glicko.pdf
Mark E. GLickman (2001): Dynamic paired comparison models with stochastic variances, Journal of Applied Statistics, 28:673-689. URL http://www.glicko.net/research/dpcmsv.pdf
Mark E. Glickman (1995): A Comprehensive guide to chess ratings. American Chess Journal, 3, pp. 59–102. http://www.glicko.net/research/acjpaper.pdf
Ruby C. Weng and Chih-Jen Lin (2011): A Bayesian Approximation Method for Online Ranking. Journal of Machine Learning Research,12:267-300. URL http://jmlr.csail.mit.edu/papers/volume12/weng11a/weng11a.pdf
William D. Penny and Stephen J. Roberts (1999): Dynamic Logistic Regression, Departament of Electrical and Electronic Engineering, Imperial College